import request from '@/utils/request'

// 查询习惯列表
export function queryHabitList(params) {
  return request({
    url: '/web/habit/list/',
    method: 'get',
    params: params
  })
}
//添加习惯
export function addHabit(data) {
  return request({
    url: '/web/habit/add/',
    method: 'post',
    data: data
  })
}
//修改习惯
export function updateHabit(data) {
  return request({
    url: '/web/habit/edit/',
    method: 'put',
    data: data
  })
}
//根据id查询
export function getOne(id) {
  return request({
    url: '/web/habit/getOne/' + id,
    method: 'get',
  })
}
//删除习惯
export function removeHabit(ids) {
  return request({
    url: '/web/habit/remove/' + ids,
    method: 'delete'
  })
}
//导入模板下载
export function exportTemplate() {
  return request({
    url: '/web/habit/exportTemplate',
    method: 'post',
  })
}

